<template>
  <div>
     <van-nav-bar
      class="page-nav-bar"
      title="xxx评论"
    >
    <template #left>
    <van-icon name="cross" @click="$emit('close')"/>
  </template>
    </van-nav-bar>
<commponentItem :articleList="articleList"></commponentItem>
 <van-cell title="全部评论"/>
<ArticleComment :articleId="articleList.com_id" type="c" :list="listdata"></ArticleComment>
<CommentPost :target="articleList.com_id" @postMessage="onbtnPost"></CommentPost>
  </div>
</template>

<script>
import commponentItem from './commponent-item.vue'
import ArticleComment from './article-comment.vue'
import CommentPost from './comment-post.vue'
export default {
  components: {
    commponentItem,
    ArticleComment,
    CommentPost
  },
  props: {
    articleList: {
      type: Object,
      required: true
    }
  },
  data () {
    return {
      listdata: []
    }
  },
  methods: {
    onbtnPost (data) {
      console.log(data)
      this.listdata.unshift(data.new_obj)
    }
  }
}
</script>

<style>

</style>
